package xiangmu.schoolpaper.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import xiangmu.schoolpaper.pojo.DTO.TeacherHomeAllOverviewDTO;
import xiangmu.schoolpaper.result.Result;
import xiangmu.schoolpaper.service.TeacherHomeAllOverviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RequiredArgsConstructor

@Slf4j
@Tag(name="教师端统计分析整体统计概览接口")
@RestController
@RequestMapping("/teacher/home")
public class TeacherHomeAllOverviewController {

    @Autowired
    private TeacherHomeAllOverviewService teacherHomeAllOverviewService;
    @Operation(summary = "查看最新提交的论文评分情况")
    @GetMapping("/overview")
    public Result getTeacherHomeOverview(@RequestParam String teacherId, @RequestParam Integer year) {
        TeacherHomeAllOverviewDTO result = teacherHomeAllOverviewService.getTeacherHomeOverview(teacherId,year);
        log.info("最新提交的论文评分情况");
        return Result.success(result);
    }
}